﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Wix.Aura.Common;
using NUnit.Framework;

namespace Wix.Aura.UnitTests.Common {
	public abstract class XmlAssertionBase {
		protected void Assertion(string expected, Serializable actual) {
			using (MemoryStream stream = new MemoryStream()) {
				actual.Serialize(stream);

				string result = Encoding.ASCII.GetString(stream.ToArray());
				Assert.That(result.Trim('?'), Is.EqualTo(expected));
			}
		}
	}
}
